Next | Prev | Up | Top | Contents | Index

Timed Pauses

In many instances a program, or a process within a multiprocess program, needs to suspend execution for a period of time. IRIX contains a variety of functions that provide this capability. The functions differ in their precision and in their portability. Table 5-1 contains a summary.

Functions for Timed Suspensions
Reference PagePrecisionPortabilityOperation
sleep(3C)secondPOSIXSuspend for a number of seconds or until a signal arrives.
usleep(3C)microsecondSGISuspend for a number of microseconds or until a signal arrives.
nanosleep(2)nanosecondPOSIXSuspend for a number of seconds and nanoseconds or until a signal arrives.


Next | Prev | Up | Top | Contents | Index